Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jan 9, 2026

Option added directly into the account menu

Bildschirmfoto vom 2026-01-09 16-27-25

QR code can be configured to be one-time

Only supported with future mobile clients of Android and iOS. Since old ones break, it's disabled by default for now, but will be enabled by default in a future version.
Also the current settings page does not use this, as it's already showing the app password and we can not change the type afterwards.
Expiration time can be configured with an app config.

One time QR Code that expires Permanent QR code like before this PR
image image

Admin setting to disable app password generation

Default Disabled
Bildschirmfoto vom 2026-01-09 16-30-51 Bildschirmfoto vom 2026-01-09 16-30-39

Checklist

@nickvergessen nickvergessen added this to the Nextcloud 33 milestone Jan 9, 2026
@nickvergessen nickvergessen self-assigned this Jan 9, 2026
@nickvergessen nickvergessen requested a review from a team as a code owner January 9, 2026 15:37
@nickvergessen nickvergessen added the 3. to review Waiting for reviews label Jan 9, 2026
@nickvergessen nickvergessen requested a review from a team as a code owner January 9, 2026 15:37
@nickvergessen nickvergessen requested review from ArtificialOwl, leftybournes, nfebe, sorbaugh, susnux and szaimen and removed request for a team January 9, 2026 15:37
@nickvergessen nickvergessen mentioned this pull request Jan 9, 2026
nickvergessen and others added 2 commits January 9, 2026 19:07
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Maksim Sukharev <[email protected]>
@Antreesy Antreesy force-pushed the feat/noid/qr-code-in-account-menu branch from 4e77da6 to 80f6856 Compare January 9, 2026 18:09
Signed-off-by: Joas Schilling <[email protected]>

if ($qrcodeLogin) {
if ($this->appConfig->getAppValueBool(ConfigLexicon::LOGIN_QRCODE_ONETIME)) {
$name = 'One time login';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that need translation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both should be very temporary as valid devices scanning the code will set a proper name.
But I added it for now

@nickvergessen nickvergessen merged commit 6bdda55 into master Jan 12, 2026
217 of 255 checks passed
@nickvergessen nickvergessen deleted the feat/noid/qr-code-in-account-menu branch January 12, 2026 13:01
@mahibi
Copy link

mahibi commented Jan 16, 2026

@nickvergessen Testing with android talk implementation on Sermo i get 403 after removing account and try to login another time:

nextcloud/talk-android#5700 (comment)

  1. Login with onetime QR (works)
  2. remove account in app
  3. Login with new onetime QR for same account

Bug:
"Something went wrong" snackbar is shown. Log is:

2026-01-16 10:02:28.650 11291-11470 okhttp.OkHttpClient     com.nextcloud.talk2                  I  {"ocs":{"meta":{"status":"failure","statuscode":403,"message":"could not get one-time app password"},"data":[]}}
2026-01-16 10:02:28.650 11291-11470 okhttp.OkHttpClient     com.nextcloud.talk2                  I  <-- END HTTP (112-byte body)
2026-01-16 10:02:28.650 11291-11470 NetworkLoginDataSource  com.nextcloud.talk2                  E  Error caught at oneTimePasswordRequest: java.io.IOException: Unexpected code Response{protocol=h2, code=403, message=, url=https://.....yourserverurl......com/ocs/v2.php/core/getapppassword-onetime}

@nickvergessen
Copy link
Member Author

For the record, I responded in chat.
Most likely a problem in the mobile app, it sees to send cookie or other authentication data so the session used is not a one-time session and therefore the endpoint can not be called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants